Adding Roles to Relationship Patterns

نویسندگان

  • Matteo Baldoni
  • Guido Boella
  • Leon van der Torre
چکیده

In this paper we study how roles can be added to patterns modelling relationships in Object Oriented programming, and which new relationship patterns can be introduced using roles. Relationships can be introduced in programming languages either by reducing them to attributes of the objects which participate in the relationship, or by modelling the relationship itself as a class whose instances have the participants of the relationships among their attributes. However, even if roles have been recognized as an essential component of relationships, also in modelling languages like UML, they have not been introduced in Object Oriented programming when it is necessary to model relationships. Introducing roles allows to add attributes and behaviors to the participants in the relationship, rather than to the relationship itself, and to distinguish natural types as classes participating in the relationships from the roles the participants acquire in the relationships. In this paper we show how the role model proposed in powerJava can be used to endow relationships with roles, both in the relationship as attribute and in the relationship object pattern. Finally, since these patterns have different advantages and limitations, we propose a third pattern based on roles which benefits from the advantages of the two previous patterns when modelling relationships.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Investigating Work-Family Conflict and its Effective Factors: Evidence from Auditors

Work - family Conflict is defined as a challenge between the effective play of family and work roles. The main purpose of this study is to investigate the relationship between work-family conflict and family-work conflict. Then, the factors affecting such factors as occupational factors, stress, and flexible working patterns are investigated, and finally, they are seeking solutions to minimize ...

متن کامل

Data envelopment analysis for imprecise data in Buyer-Seller Relationship

In the environment of business‐to‐business e‐commerce, Buyers and sellers in mature industrial markets can turn single transactions into long-term beneficial relationships by a deeper understanding of the complex connection between the two and buyers and sellers are uncertain about their roles. A “must-do” for the sellers, in particular, is to understand patterns of investment and reward,...

متن کامل

The Interplay between Relationships, Roles and Objects

In this paper we study the interconnection between relationships and roles. We start from the patterns used to introduce relationships in object oriented languages. We show how the role model proposed in powerJava can be used to define roles in an abstract way in objects representing relationships, to specify the interconnections between the roles. Abstract roles cannot be instantiated. To part...

متن کامل

The Effectiveness of Image Relationship Therapy on Communication Patterns and Marital Burnout in Couples

The purpose of this study was to investigate the effectiveness of Image Relationship Therapy on communication patterns and marital burnout in couples. The purpose of this study was applied and its method is the experiment was semi-experimental with pre-test, post-test and follow-up with the control group. In this research, the sampling method of couples referring to counseling centers in Tehran...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2007